// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import store from "./store/index";
import router from "./router/index";
import axios from "./services/api";
import FastClick from "fastclick";
import Navigation from 'vue-navigation';
import { DatetimePlugin, CloseDialogsPlugin, ConfigPlugin, BusPlugin, LocalePlugin, DevicePlugin, ToastPlugin, AlertPlugin, ConfirmPlugin, LoadingPlugin, WechatPlugin, AjaxPlugin, AppPlugin } from 'vux'

require('./assets/css/reset.css');

Vue.config.debug = true;

window.Vue = Vue;

Vue.use(Navigation, {router});
Vue.use(ConfirmPlugin)

Vue.prototype.axios = axios;

// 消除 click 移动浏览器300ms延迟
if ('addEventListener' in document) {
  document.addEventListener('DOMContentLoaded', function () {
    FastClick.attach(document.body)
  }, false)
}

/* eslint-disable no-new */
new Vue({
  template: '<App/>',
  router,
  store,
  components: {App}
}).$mount('#app');
